import { createApp } from 'vue'
import { createPinia } from 'pinia'
import App from './App.vue'
import router from './router'
import i18n from './i18n'
import {
    Button,
    NavBar,
    Tabbar,
    TabbarItem,
    Form,
    Field,
    CellGroup,
    Dialog,
    Toast,
    Loading,
    Icon,
    Popup,
    Calendar,
    List,
    PullRefresh,
    Swipe,
    SwipeItem,
    Cell,
    Image as VanImage,
    Picker
} from 'vant'
import 'vant/lib/index.css'
import './styles/main.scss'

const app = createApp(App)

// 注册Vant组件
const vantComponents = [
    Button,
    NavBar,
    Tabbar,
    TabbarItem,
    Form,
    Field,
    CellGroup,
    Dialog,
    Toast,
    Loading,
    Icon,
    Popup,
    Calendar,
    List,
    PullRefresh,
    Swipe,
    SwipeItem,
    Cell,
    VanImage,
    Picker
]

vantComponents.forEach(component => {
    app.use(component)
})

app.use(createPinia())
app.use(router)
app.use(i18n)

app.mount('#app') 